import 'package:flutter/material.dart';

class NoTaskComp extends StatefulWidget {
  NoTaskComp({super.key, required this.title});
  String title;

  @override
  State<NoTaskComp> createState() => _NoTaskCompState();
}

class _NoTaskCompState extends State<NoTaskComp> {
  // 定义无任务数据，提示文本
  String title = '';
  @override
  void initState() {
    super.initState();
    title = widget.title;
  }

  @override
  Widget build(BuildContext context) {
    return Center(
      child: Column(
        mainAxisAlignment: MainAxisAlignment.center,
        crossAxisAlignment: CrossAxisAlignment.center,
        children: [
          Image.asset(
            'assets/images/ic_not_found.png',
            width: 200,
            height: 120,
          ),
          SizedBox(height: 20),
          Text(title),
        ],
      ),
    );
  }
}
